/**
 * 
 */
package cn.xiazhengxin.blog.util

/**
 * @author sharl
 *
 */
class ClientInfo {
	
	 static getOS(ua){
		 if(ua.indexOf('Windows')!= -1){
				return "Windows"
			}else if(ua.indexOf('Linux') != -1){
				return "Linux"
			}else{
				return "null"
			}
	 }
	 
	 static getBrowser(ua){
		 
		 def list = ["Chrome","Firefox","Opera","MSIE"]
		 def browser = "unknown"
		 list.each{
			 if(ua.indexOf(it)!= -1){
				 browser = it
			 }
		 }
		 return browser
	 }
}
